package com.example.shiro.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.List;

@Data
@Document(indexName="sys_user")
public class SysUser implements Serializable {
    @Id
    private int id;
    // 使用分词器
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String username;
    private String password;
    private String email;
    private String phone;
    private int sex;
    private String salt;
    private int age;
    private int status;
    private String create_time;
    private String update_time;
    private String last_login_time;
    private List<Role> roles;
}
